import { AppConst } from "../const/Const";
import { platformConf } from "../platform/platformConf";

export class Debug {

    static isAlwaysLog = false;

    static log(message?: any, ...optionalParams: any[]) {
        if (platformConf.currentApp == AppConst.WEB || Debug.isAlwaysLog) {
            console.log(message, ...optionalParams);
        }
    }
    static warn(message?: any, ...optionalParams: any[]) {
        if (platformConf.currentApp == AppConst.WEB || Debug.isAlwaysLog) {
            console.warn(message, ...optionalParams);
        }
    }
    static error(message?: any, ...optionalParams: any[]) {
        if (platformConf.currentApp == AppConst.WEB || Debug.isAlwaysLog) {
            console.error(message, ...optionalParams);
        }
    }
}